home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / finish-install.d / 02remove_broken_cdrom
Encoding:
Text File  |  2009-01-11  |  518 b   |  17 lines

  1. #!/bin/sh
  2. while read line; do
  3.     set -- $line
  4.         if echo "$2" | grep -qs "\(/cdrom\|/media/cdrom\)"; then
  5.                 fs="$(PATH="/lib/udev:$PATH" vol_id --type "$1" || true)"
  6.                 if [ -n "$fs" ] && [ "$fs" != "iso9660" ] && [ "$fs" != "udf" ]; then
  7.  
  8.                         :
  9.                 else
  10.                         echo "$line"
  11.                 fi
  12.         else
  13.                 echo "$line"
  14.         fi
  15. done < /target/etc/fstab > /target/etc/fstab.new
  16. mv /target/etc/fstab.new /target/etc/fstab
  17.